package com.gydtrade.appweb.system.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: CommonController
 * @Description: TODO
 * @author: wmsh
 * @Date: 2023-10-15 22:25
 * @Version: V1.0.0
 */
@Slf4j
@Controller
public class CommonController {

    @RequestMapping({"/", "/index.html"})
    public String front_index(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/about.html"})
    public String about(Model model){
        model.addAttribute("navbar", "about");
        return "front/about";
    }

    @RequestMapping({"/news.html"})
    public String news(Model model){
        model.addAttribute("navbar", "news");
        return "front/news";
    }

    @RequestMapping({"/newsshow.html"})
    public String newsshow(Model model){
        return "front/newsshow";
    }

    @RequestMapping({"/case.html"})
    public String case_page(Model model){
        model.addAttribute("navbar", "case");
        return "front/case";
    }

    @RequestMapping({"/caseshow.html"})
    public String caseshow(Model model){
        return "front/caseshow";
    }

    @RequestMapping({"/wenti.html"})
    public String wenti_page(Model model){
        model.addAttribute("navbar", "wenti");
        return "front/wenti";
    }

    @RequestMapping({"/wentishow.html"})
    public String wentishow(Model model){
        return "front/wentishow";
    }

    @RequestMapping({"/contact.html"})
    public String contact(Model model){
        model.addAttribute("navbar", "contact");
        return "front/contact";
    }

    @RequestMapping({"/admin", "/login.html"})
    public String sys_index(Model model){
        return "system/login";
    }
}
